package edu.njust.pojo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.sql.Date;
import java.sql.Time;
import java.util.List;


@Data
@AllArgsConstructor
@NoArgsConstructor
public class CompetitionReservation extends Reservation{
    private Date date;
    private Time begin_time;
    private Time end_time;

    public CompetitionReservation(String user_id, String name, Integer type, Date date, Time begin_time, Time end_time) {
        super(user_id, name, type);
        this.date = date;
        this.begin_time = begin_time;
        this.end_time = end_time;
    }
    public Reservation toReservation(){
        Reservation reservation = new Reservation(this.getId(), this.getUser_id(), this.getName(), this.getState(), 4);
        return reservation;
    }
}
